package com.beeway.blackgoose.constants;

import com.lidroid.xutils.http.RequestParams;

/**
 * @说 明：
 * @项目名称：BlackGoose
 * @包 名： com.beeway.blackgoose.constants
 * @类 名：
 * @创 建人：chenshuangniu
 * @创建时间：2015 2015/9/19
 * @版 本：v1.0
 * @修 改人：
 * @修改时间：
 * @修改备注：
 */

public class Config {
    public static RequestParams params;
    //  代金券的类型
    public static String COUPON_TYPE = "type";
    //忘记密码类型
    public static String FORGET_TYPE = "forget";
    //注册类型
    public static String REGISTER_TYPE = "register";
    //代金券所有类型
    public static final String COUPON_ALL = "all";
    // 代金券未使用类型
    public static final String COUPON_UNUSED = "nuused";
    // 代金券使用类型
    public static final String COUPON_USED = "used";
    //代金券 过期类型
    public static final String COUPON_OVERDUE = "overdue";
    //手机注册
    public static final String ACCOUT_TYPE_PHONE = "0";
    //手机注册
    public static final String ACCOUT_TYPE_QQ = "1";
    //手机注册
    public static final String ACCOUT_TYPE_WECHAT = "2";
    //访问服务器 成功 状态
    public static final String STATE_SUCESS = "0";
    //访问服务器 失败 状态
    public static final String STATE_FAIL = "1";
    //我的收藏列表url
    public static final String MYSTORE_URL = "http://192.168.2.33/lbs/project/app/Collect/CollectselerList";
    //手机验证码url
    public static final String PHONE_CODE_URL = "http://192.168.2.33/lbs/project/app/consumer/IsPhoneRegistered";
    //手机提交注册信息url
    public static final String PHONE_REGISTER_URL = "http://192.168.2.33/lbs/project/app/consumer/Regist";
    // 手机修改密码 手机验证码的url
    public static final String PHONE_UPDATECODE_URL = "http://192.168.2.33/lbs/project/app/Consumer/SendForgetpwdCode";
    //手机修改密码 提交修改信息url
    public static final String PHONE_UPDATE_URL = "http://192.168.2.33/lbs/project/app/Consumer/Forgetpwd";
    //用户登录服务器url
    public static final String USER_LOGIN_URL = "http://192.168.2.33/lbs/project/app/consumer/Login";
    //修改用户密码url
    public static final String CHANGE_UERS_PWD_URL = "http://192.168.2.33/lbs/project/app/Consumer/Changepwd";
    //修改用户昵称url
    public static final String CHANGE_UERS_NAME_URL = "http://192.168.2.33/lbs/project/app/Consumer/SaveNikename";
    //用户退出登录
    public static final String USER_EXIT_URL = "http://192.168.2.33/lbs/project/app/Consumer/consumerLogout";

    //修改类型
    public static final String CHANGE_NAME = "name";
    public static final String CHANGE_PHONE = "phone";
    public static final String CHANGE_PWD = "pwd";
    public static final String CHANGE_EMAIL = "email";
    //修改账号的请求响应码
    public static final int CHANGE_NAME_REQUST_CODE = 100;
    public static final int CHANGE_PHONE_REQUST_CODE = 101;
    public static final int CHANGE_EMAIL_REQUST_CODE = 102;
    public static final int CHANGE_PWD_REQUST_CODE = 103;

    public static final int CHANGE_NAME_RESULT_CODE = 1000;
    public static final int CHANGE_PHONE_RESULT_CODE = 1001;
    public static final int CHANGE_EMAIL_RESULT_CODE = 1002;
    public static final int CHANGE_PWD_RESULT_CODE = 1003;

    //添加手机验证码post的参数
    public static RequestParams getPhoneCodeParams(String phoneNumber) {
        params = new RequestParams();
        params.addBodyParameter("telephone", phoneNumber);
        return params;
    }

    //添加手机密码和验证码到服务器post的参数
    public static RequestParams getsendPwdPhoneNumber(String number, String userPwd, String code) {
        params = new RequestParams();
        params.addBodyParameter("telephone", number);
        params.addBodyParameter("password", userPwd);
        params.addBodyParameter("code", code);
        return params;
    }

    /* telephone：手机号码（必填）
     password：密码（必填）
     account_type：账户类型 （必填）0：(本地注册)1:(QQ)2:(微信)*/
    //消费者登录post的参数
    public static RequestParams getUserLoginParams(String number, String userPwd, String type) {
        params = new RequestParams();
        params.addBodyParameter("telephone", number);
        params.addBodyParameter("password", userPwd);
        params.addBodyParameter("account_type", type);
        return params;
    }

    /* sessionid
     oldpassword :旧密码
     password:新密码*/
    //修改消费者密码post的参数
    public static RequestParams getUserChangePwdParams(String sessionid, String oldpwd, String newpwd) {
        params = new RequestParams();
        params.addBodyParameter("sessionid", sessionid);
        params.addBodyParameter("oldpassword", oldpwd);
        params.addBodyParameter("password", newpwd);
        return params;
    }

    //修改昵称post参数
    public static RequestParams getUserChangeNameParams(String name, String sessionid) {
        params = new RequestParams();
        params.addBodyParameter("nikename", name);
        params.addBodyParameter("sessionid", sessionid);
        return params;
    }

    //修改用户退出登录参数
    public static RequestParams getUserExit(String sessionid) {
        params = new RequestParams();
        params.addBodyParameter("sessionid", sessionid);
        return params;
    }

}
